﻿using System;
using System.Collections.Generic;
using System.Drawing;//需要引用的命名空间
using System.Text;//需要引用的命名空间
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["uName"];
        if (cookie == null)
        {
            Response.Write("<script>alert('你还没登录');window.location='Cookie.aspx';</script>");
        }
        else
        {
            Response.Write(cookie.Value + ":" + cookie.Expires+"人数："+Application["online"].ToString());
        }

       if(Request.HttpMethod.ToLower()=="post")
       {            
         
           string realVcode = Request.Cookies["vCode"].Value;
           string vCode = Request.Form["txtVcode"];
           if (realVcode == vCode)
           {
               Response.Write("<script>alert('验证码正确')</script>");
           }
           else
           {
               Response.Write("<script>alert('验证码错误')</script>");
           }
       }
    }
      
}